Skip to content

SRE-3706 Submodule framework, shellcheck and codespell#4

Merged
JohnMalmberg merged 9 commits into
mainfrom
sre-3706-codespell
Apr 27, 2026
Merged

SRE-3706 Submodule framework, shellcheck and codespell#4
JohnMalmberg merged 9 commits into
mainfrom
sre-3706-codespell

Conversation

@JohnMalmberg

@JohnMalmberg JohnMalmberg commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

Add framework to run checks from consumer repos using this as a submodule.

Add shellcheck as the first integrated linter to validate framework.

Add pre-commit and GitHub guardrails for .code-checking-ref override usage

.github/workflows/bootstrap-checks.yml: updated to run linters via framework.
.pre-commit-hooks.yaml: hook definitions updated (guard + runner entrypoint)
.pre-commit-config.yaml: local hook config updated (guard + runner entrypoint)
README.md updated links to detailed integration/rules guidance
bin/ bootstrap-windows-dev.ps1: added pre-commit to bootstrap ide-workspace-setup.py: updated. run-linters.sh, run-linters.ps1: updated for shared orchestration and ref checks setup-dev.ps1 and setup-dev.sh: added pre-commit installation.
checks/ detect-linters.* and linters/shellcheck/run.*: framework wiring
checks/ ensure-code-checking-ref.sh, ensure-code-checking-ref.ps1, guard-code-checking-ref.sh, ensure-linter-tools.sh: added
docs/ integration.md: code-checking-ref usage guidance added. linters.md, usage.md: updated
ide/reference/recommended_settings.yml: Shelllcheck fix for GitHub Copilot interaction problem.
vscode-project-words.txt: More words added.

Add framework to run checks from consumer repos using this as a submodule.

Add shellcheck as the first integrated linter to validate framework.

Add pre-commit and GitHub guardrails for .code-checking-ref override
usage

- .github/workflows/bootstrap-checks.yml:
  updated to run bootstrap check via framework.
- .github/workflows/checks.yml:
  Added to run the code checking via framework.
- .pre-commit-hooks.yaml:
  hook definitions updated (guard + runner entrypoint)
- .pre-commit-config.yaml:
  local hook config updated (guard + runner entrypoint)
- README.md
  updated links to detailed integration/rules guidance
- bin/
  bootstrap-windows-dev.ps1: added pre-commit to bootstrap
  ide-workspace-setup.py: updated.
  run-linters.sh, run-linters.ps1:
  updated for shared orchestration and ref checks
  setup-dev.ps1 and setup-dev.sh: added pre-commit installation.
  setup-github-workflow.sh: setup work flow for submodule users
  sync-consumer.*: For initial setup of submodule consumer.
- checks/
  detect-linters.* and linters/shellcheck/run.*:
  framework wiring
- checks/
  ensure-code-checking-ref.sh, ensure-code-checking-ref.ps1,
  guard-code-checking-ref.sh, ensure-linter-tools.sh: added
  verify-executable-modes.sh: Check execute permissions.
- docs/
  integration.md: code-checking-ref usage guidance added.
  linters.md, usage.md: updated
- ide/reference/recommended_settings.yml:
  Shelllcheck fix for GitHub Copilot interaction problem.
- vscode-project-words.txt: More words added.

Signed-off-by: John E. Malmberg <john.malmberg@hpe.com>
Signed-off-by: John E. Malmberg <john.malmberg@hpe.com>
@JohnMalmberg JohnMalmberg requested a review from a team as a code owner April 15, 2026 14:34
@janekmi janekmi self-requested a review April 15, 2026 19:01
Extend the shared linter framework with baseline text-focused checks.

Added linters/checks:
- codespell
- text-hygiene (trailing whitespace and final newline)
- filename-portability (non-ASCII filename guard)

Also keep shellcheck in the same runner orchestration path and update
pre-commit wiring to run the shared changed-file linter selection.

Files updated:
- .github/workflows/checks.yml
  - install codespell with shellcheck in CI dependency step
- .pre-commit-hooks.yaml
- .pre-commit-config.yaml
  - use shared basic source linter hook entrypoint
- bin/run-linters.sh
- bin/run-linters.ps1
  - route selected linters to per-linter executors
- checks/detect-linters.sh
- checks/detect-linters.ps1
  - select Wave A linters from changed file set
- checks/ensure-linter-tools.sh
  - add codespell tool preflight check
- checks/linters/codespell/run.sh
- checks/linters/codespell/run.ps1
- checks/linters/text-hygiene/run.sh
- checks/linters/text-hygiene/run.ps1
- checks/linters/filename-portability/run.sh
- checks/linters/filename-portability/run.ps1
  - add new linter executors
- docs/linters.md
  - document added linter set and preflight mapping
- ide/reference/recommended_settings.yml
  - map .ansible-lint and .yamllint to yaml for VS Code file type

Signed-off-by: John E. Malmberg <john.malmberg@hpe.com>

@janekmi janekmi left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am still in progress but I decided to publish since I noticed you go forward with the development. I am sorry if you did not expect reviewers to come at this time.

Note: I left all *.ps1 files to our PowerShell experts.

Comment thread README.md
Comment thread checks/guard-code-checking-ref.sh Outdated
Comment thread bin/setup-dev.sh Outdated
Comment thread bin/setup-dev.sh Outdated
Comment thread bin/setup-dev.sh Outdated
Comment thread bin/sync-consumer.sh
Comment thread bin/sync-consumer.sh Outdated
Comment thread bin/sync-consumer.sh Outdated
Comment thread bin/sync-consumer.sh
Comment thread bin/sync-consumer.sh

@janekmi janekmi left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's all.

Comment thread docs/integration.md Outdated
Comment thread docs/integration.md Outdated
Comment thread docs/integration.md
Comment thread docs/integration.md Outdated
Comment thread docs/integration.md Outdated
Comment thread docs/usage.md Outdated
Comment thread docs/usage.md Outdated
Comment thread docs/vscode-cspell.md Outdated
Comment thread ide/reference/recommended_settings.yml
Comment thread ide/reference/recommended_settings.yml
@JohnMalmberg JohnMalmberg changed the base branch from main to sre-3706-shellcheck April 22, 2026 15:03
@JohnMalmberg JohnMalmberg changed the base branch from sre-3706-shellcheck to main April 22, 2026 15:06
Added a setup-dev.sh smoke test to validate that it works on macOS.

Signed-off-by: John E. Malmberg <john.malmberg@hpe.com>

@JohnMalmberg JohnMalmberg left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was supposed to be the second of two separate PRs to reduce the number of lies changed in this review, but in my haste to get it committed before I left int actually contains both PRs and I started applying the fixes before I realized that it was both PRs.

I also did not have a chance to run the unit tests on this PR on a consumer repository.

New update pushed.

Comment thread .github/workflows/checks.yml Outdated
Comment thread .github/workflows/checks.yml Outdated
Comment thread .github/workflows/checks.yml Outdated
Comment thread .github/workflows/checks.yml Outdated
Comment thread bin/ide-workspace-setup.py
Comment thread docs/linters.md Outdated
Comment thread docs/linters.md Outdated
Comment thread docs/linters.md Outdated
Comment thread docs/linters.md
Comment thread docs/linters.md
Signed-off-by: John E. Malmberg <john.malmberg@hpe.com>
Signed-off-by: John E. Malmberg <john.malmberg@hpe.com>
Missed all the reviewer comments because I did not expand the large
diff.

Signed-off-by: John E. Malmberg <john.malmberg@hpe.com>

@JohnMalmberg JohnMalmberg left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hopefully the current push addresses all the concerns.

Missed these on the previous pass.

Comment thread docs/integration.md Outdated
Comment thread docs/integration.md Outdated
Comment thread docs/integration.md Outdated
Comment thread docs/integration.md Outdated
Comment thread docs/integration.md Outdated
Comment thread docs/integration.md
Comment thread docs/integration.md
Comment thread docs/linters.md
Comment thread docs/linters.md
Comment thread docs/linters.md
@JohnMalmberg JohnMalmberg requested a review from janekmi April 23, 2026 13:10
Signed-off-by: John E. Malmberg <john.malmberg@hpe.com>
@JohnMalmberg

Copy link
Copy Markdown
Contributor Author

Code has now been tested with https://github.com/daos-stack/system-pipeline-lib/actions/runs/24850838716/job/72750526068?pr=21 and got the expected results that the override to use this PR instead of tip of main is present.

@ryon-jensen ryon-jensen changed the title Sre 3706 codespell SRE-3706 Submodule framework, shellcheck and codespell Apr 27, 2026
ryon-jensen
ryon-jensen previously approved these changes Apr 27, 2026

@ryon-jensen ryon-jensen left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple nits

Comment thread README.md Outdated
Comment thread .pre-commit-config.yaml Outdated
Signed-off-by: John E. Malmberg <john.malmberg@hpe.com>
@ryon-jensen ryon-jensen dismissed janekmi’s stale review April 27, 2026 15:57

Believe all requested changes have been resolved.

@JohnMalmberg JohnMalmberg merged commit 4c36930 into main Apr 27, 2026
10 checks passed
@JohnMalmberg JohnMalmberg deleted the sre-3706-codespell branch April 27, 2026 16:10
@janekmi

janekmi commented Apr 27, 2026

Copy link
Copy Markdown

Apologies for not being able to attend this review till the end. Last week was too busy with other activities for me.
Thank you for all the efforts put in addressing my comments. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants